package com.itboye.lottery.widget.titlebarwidget

import android.app.Activity
import android.text.TextUtils
import android.view.View
import android.widget.RelativeLayout
import android.widget.TextView
import com.itboye.lottery.app.MyApplication
import com.itboye.lottery.R
import com.itboye.lottery.utils.SizeUtils
import java.security.AccessController.getContext

/**
 * Created by Administrator (IntelliJ IDEA) on 2018/6/26.
 * @description: Lottery
 *
 */
class TitleBarStyleUtil {
    companion object {
        fun initTitlebarStyle(actionBar: TranslucentActionBar, title: String, leftIcon: Int, strLeft: String, rightIcon: Int, strRight: String, listener: View.OnClickListener) {
            //初始actionBar
            actionBar.setData(title, leftIcon, strLeft, rightIcon, strRight, listener)
            //开启渐变
            //        actionBar.setNeedTranslucent();
            //设置状态栏高度
            actionBar.setStatusBarHeight(SizeUtils.getStatusBarHeight())
        }

        fun initTitlebarStyle(actionBar: TranslucentActionBar, title: String, leftIcon: Int, strLeft: String, rightIcon: Int, strRight: String, listener: View.OnClickListener, needTranclucent: Boolean) {
            //初始actionBar
            actionBar.setData(title, leftIcon, strLeft, rightIcon, strRight, listener)
            //开启渐变
            actionBar.setNeedTranslucent(needTranclucent, true)
            //设置状态栏高度
            actionBar.setStatusBarHeight(SizeUtils.getStatusBarHeight())
        }
    }
}